package com.mystore.dao.impl;

import com.mystore.dao.BaseDao;
import com.mystore.dao.KindDao;
import com.mystore.entity.Kind;

import java.sql.Connection;
import java.util.List;

public class KindDaoImpl implements KindDao {

    private BaseDao baseDao;

    public KindDaoImpl() {
        this.baseDao = new BaseDaoImpl();
    }

    @Override
    public Object findAllKind(Connection connection) {
        String sql = "select * from category";
        List<Kind> kindList = null;
        try {
            kindList = baseDao.findMoreRefResult(sql,null,Kind.class,connection);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return kindList;
    }


}
